var fl =document.querySelector("#xiazai");
var dt_nav_btn =document.querySelector("#app");
var down = document.querySelector('.xiazai')
//鼠标经过事件，显示
fl.addEventListener("mouseover",function(){
	dt_nav_btn.style.height="174px";
	dt_nav_btn.style.opacity="1";
})
//鼠标经过事件，除本身。隐藏
down.addEventListener("mouseleave",function(){
	dt_nav_btn.style.height="0";
	dt_nav_btn.style.opacity="0";
})


var xx=document.querySelector("#xx");
function x(){
	var x=document.querySelector("#x");
	x.style.display="none";
}
function aa(){
	xx .style.display="block";
	txt.addEventListener("blur",function(){
	xx .style.display="none";
	})
}



//根据
//
//window.onscroll = function(){
//	//如果距离顶部的位置，大于1262像素的时候，就让右侧的第2个加，其余移除 active
//	
//}
var dingwei = document.querySelector("#nav-list");
var di = document.querySelectorAll("#nav-list .item-sortable");
var n1 = document.querySelectorAll(".zone-wrap-module");
window.onscroll=function(){
	if(document.documentElement.scrollTop>400){
		dingwei.style.top="30px";
	}else{
		dingwei.style.top="235px";
		di[0].className="item-sortable"
	}
	var arr = [0,700,1288,1638,2668,3477,4004,4416,4846,5237,5648,6060,6470,6881,7292,7440,8134,8545,8956,9368]
	for(var i=0;i<di.length;i++){
		di[i].index = i;
		if(document.documentElement.scrollTop>arr[i]){
			for(var j = 0;j<di.length;j++){
				di[j].className = "item-sortable"
			}
			di[i].className = "item-sortable active"
		}
	}
}





function wcwzbd(){
	window.scrollTo({
		top:0,
		behavior:'smooth'
	})
} 

function wcwzbdzb(){
	window.scrollTo({
		top:700,
		behavior:'smooth'
	})
} 
function wcwzbddh(){
	window.scrollTo({
		top:1228,
		behavior:'smooth'
	})
} 
function wcwzbdfj(){
	window.scrollTo({
		top:1638,
		behavior:'smooth'
	})
} 
function wcwzbdyc(){
	window.scrollTo({
		top:2668,
		behavior:'smooth'
	})
}
function wcwzbdyy(){
	window.scrollTo({
		top:3477,
		behavior:'smooth'
	})
} 
function wcwzbdwd(){
	window.scrollTo({
		top:4004,
		behavior:'smooth'
	})
} 
function wcwzbdyx(){
	window.scrollTo({
		top:4416,
		behavior:'smooth'
	})
} 
function wcwzbdkj(){
	window.scrollTo({
		top:4846,
		behavior:'smooth'
	})
} 
function wcwzbdsm(){
	window.scrollTo({
		top:5237,
		behavior:'smooth'
	})
} 
function wcwzbdsh(){
	window.scrollTo({
		top:5648,
		behavior:'smooth'
	})
} 
function wcwzbdgc(){
	window.scrollTo({
		top:6060,
		behavior:'smooth'
	})
} 
function wcwzbdss(){
	window.scrollTo({
		top:6470,
		behavior:'smooth'
	})
} 
function wcwzbdgg(){
	window.scrollTo({
		top:6881,
		behavior:'smooth'
	})
} 
function wcwzbdyl(){
	window.scrollTo({
		top:7292,
		behavior:'smooth'
	})
} 
function wcwzbdzl(){
	window.scrollTo({
		top:7440,
		behavior:'smooth'
	})
} 
function wcwzbddy(){
	window.scrollTo({
		top:8134,
		behavior:'smooth'
	})
} 
function wcwzbdtv(){
	window.scrollTo({
		top:8545,
		behavior:'smooth'
	})
} 
function wcwzbdys(){
	window.scrollTo({
		top:8956,
		behavior:'smooth'
	})
} 
function wcwzbdjlp(){
	window.scrollTo({
		top:9368,
		behavior:'smooth'
	})
} 


var n = document.querySelectorAll(".nav-list .lan > div");
for(let i = 0;i<n.length;i++){
	n[i].addEventListener('click',function(){
		for(let j = 0;j<n.length;j++){
			n[j].classList.remove('active')
		}
		this.classList.add('active')
	})
}



